\(\int (a+b \text {csch}^2(c+d x)) \, dx\) [4]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 16 \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=a x-\frac {b \coth (c+d x)}{d} \]

[Out]

a*x-b*coth(d*x+c)/d

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3852, 8} \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=a x-\frac {b \coth (c+d x)}{d} \]

[In]

Int[a + b*Csch[c + d*x]^2,x]

[Out]

a*x - (b*Coth[c + d*x])/d

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = a x+b \int \text {csch}^2(c+d x) \, dx \\ & = a x-\frac {(i b) \text {Subst}(\int 1 \, dx,x,-i \coth (c+d x))}{d} \\ & = a x-\frac {b \coth (c+d x)}{d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00 \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=a x-\frac {b \coth (c+d x)}{d} \]

[In]

Integrate[a + b*Csch[c + d*x]^2,x]

[Out]

a*x - (b*Coth[c + d*x])/d

Maple [A] (verified)

Time = 0.84 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06

method result size
default \(a x -\frac {b \coth \left (d x +c \right )}{d}\) \(17\)
parts \(a x -\frac {b \coth \left (d x +c \right )}{d}\) \(17\)
derivativedivides \(\frac {a \left (d x +c \right )-b \coth \left (d x +c \right )}{d}\) \(22\)
risch \(a x -\frac {2 b}{d \left ({\mathrm e}^{2 d x +2 c}-1\right )}\) \(24\)
parallelrisch \(\frac {b \left (-\coth \left (\frac {d x}{2}+\frac {c}{2}\right )-\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d}+a x\) \(34\)

[In]

int(a+b*csch(d*x+c)^2,x,method=_RETURNVERBOSE)

[Out]

a*x-b*coth(d*x+c)/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (16) = 32\).

Time = 0.25 (sec) , antiderivative size = 36, normalized size of antiderivative = 2.25 \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=-\frac {b \cosh \left (d x + c\right ) - {\left (a d x + b\right )} \sinh \left (d x + c\right )}{d \sinh \left (d x + c\right )} \]

[In]

integrate(a+b*csch(d*x+c)^2,x, algorithm="fricas")

[Out]

-(b*cosh(d*x + c) - (a*d*x + b)*sinh(d*x + c))/(d*sinh(d*x + c))

Sympy [F]

\[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=\int \left (a + b \operatorname {csch}^{2}{\left (c + d x \right )}\right )\, dx \]

[In]

integrate(a+b*csch(d*x+c)**2,x)

[Out]

Integral(a + b*csch(c + d*x)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.44 \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=a x + \frac {2 \, b}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}} \]

[In]

integrate(a+b*csch(d*x+c)^2,x, algorithm="maxima")

[Out]

a*x + 2*b/(d*(e^(-2*d*x - 2*c) - 1))

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.44 \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=a x - \frac {2 \, b}{d {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}} \]

[In]

integrate(a+b*csch(d*x+c)^2,x, algorithm="giac")

[Out]

a*x - 2*b/(d*(e^(2*d*x + 2*c) - 1))

Mupad [B] (verification not implemented)

Time = 2.32 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.44 \[ \int \left (a+b \text {csch}^2(c+d x)\right ) \, dx=a\,x-\frac {2\,b}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )} \]

[In]

int(a + b/sinh(c + d*x)^2,x)

[Out]

a*x - (2*b)/(d*(exp(2*c + 2*d*x) - 1))